<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/static/js/jquery/jquery.min.js"></script>
    <script src="/static/js/plugins/jquery-form/jquery.form.js"></script>
</head>

<script>
    $(function () {

        //将form表单转换成异步表单, 没有提交表单, 表单提交依赖,表单里面的 submit 事件
        $("#loginForm").ajaxForm(function (data) {    //function回调函数,处理异步请求返回json数据
            console.log(data);
        })
        $(".submitBtn1").click(function () {
            //将form表单转换成异步表单, 提交表单
            $("#loginForm2").ajaxSubmit(function (data) {    //function回调函数,处理异步请求返回json数据
                console.log(data);
            })
        })
    })
</script>
<body>
传统:
<form method="post"  action="/userLogin">
    <button type="submit" class="submitBtn">登录</button>
</form>

方式1:
<form method="post" id="loginForm" action="/systemDictionary/treeData">
    <button type="submit" class="submitBtn">登1录</button>
</form>


方式2:
<form method="post" id="loginForm2" action="/systemDictionary/treeData">
    <button type="button" class="submitBtn1">登2录</button>
</form>






</body>
</html>